package com.gxa.sideParking.admin.mapper;

import com.gxa.sideParking.admin.pojo.Car;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxa.sideParking.core.common.JsonResult;
import com.gxa.sideParking.core.exception.BusinessException;
import com.gxa.sideParking.core.util.R;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author gxa
 * @since 2022-10-05
 */
public interface CarMapper extends BaseMapper<Car> {

    //查询所有
    List<Car> findAll (@Param("start") Integer start,@Param("off") Integer off);

    //按车牌号码查询
    List<Car> findCarNum(String carNum) throws BusinessException;

    //按所属用户查询
    List<Car> findName(String userNickName) throws BusinessException;

    //修改绑定状态
    JsonResult updateStatus(Integer carStatus);

    //修改启用状态
    int updateForbidden(Integer carForbidden);

}
